import type { RouteRecordRaw } from 'vue-router'

function Layout() {
  return import('@/layouts/index.vue')
}

const routes: RouteRecordRaw = {
  path: '/tuangou',
  component: Layout,
  redirect: '/tuangou/index',
  name: 'tuangou',
  meta: {
    title: '团购活动',
    icon: 'tdesign:usergroup-add',
  },
  children: [
    {
      path: 'index',
      name: 'tuangouIndex',
      component: () => import('@/views/tuangou/index.vue'),
      meta: {
        title: '团长列表',
      },
    },
    {
      path: 'detail',
      name: 'tuangouDetail',
      component: () => import('@/views/tuangou/detail.vue'),
      meta: {
        title: '团长配置',
        menu: false,
        activeMenu: '/tuangou/index',
      },
    },
    {
      path: 'tuangouTuanLiat',
      name: 'tuangouTuanLiat',
      component: () => import('@/views/tuangou/tuanList.vue'),
      meta: {
        title: '团购信息',
      },
    },
    {
      path: 'tuangouTuanDetail',
      name: 'tuangouTuanDetail',
      component: () => import('@/views/tuangou/tuanDetail.vue'),
      meta: {
        title: '团购信息配置',
        menu: false,
        activeMenu: '/tuangou/tuangouTuanLiat',
      },
    },
    {
      path: 'tuangouTuanViewLIst',
      name: 'tuangouTuanViewLIst',
      component: () => import('@/views/tuangou/tuanViewList.vue'),
      meta: {
        title: '浏览记录',
        menu: false,
        activeMenu: '/tuangou/tuangouTuanLiat',
      },
    },
    {
      path: 'tuangouOrder',
      name: 'tuangouOrder',
      component: () => import('@/views/tuangou/tuangouOrder.vue'),
      meta: {
        title: '跟团订单',
      },
    },
    {
      path: 'tuangouOrderDetail',
      name: 'tuangouOrderDetail',
      component: () => import('@/views/tuangou/orderDetail.vue'),
      meta: {
        title: '跟团订单配置',
        menu: false,
        activeMenu: '/tuangou/tuangouOrder',
      },
    },
    {
      path: 'tuangouEvaluation',
      name: 'tuangouEvaluation',
      component: () => import('@/views/tuangou/tuangouEvaluation.vue'),
      meta: {
        title: '团购评价',
      },
    },
    {
      path: 'tuangouEvaluationDetail',
      name: 'tuangouEvaluationDetail',
      component: () => import('@/views/tuangou/evaluationDetail.vue'),
      meta: {
        title: '团购评价配置',
        menu: false,
        activeMenu: '/tuangou/tuangouEvaluation',
      },
    },
    {
      path: 'tuanEvalustionPraise',
      name: 'tuanEvalustionPraise',
      component: () => import('@/views/tuangou/tuangouEvaluationpraise.vue'),
      meta: {
        title: '跟团评价点赞',
      },
    },
  ],
}

export default routes
